﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using WpfApplication2.ViewModels.Nomenclador;
using WpfApplication2.UserControls;
using WpfApplication2.ViewModels;
using WpfApplication2.Views.Afiliado;
using WpfApplication2.SindicatoWebService;
using WpfApplication2.ViewModels.Afiliado;
using WpfApplication2.Helpers;
using WpfApplication2.ViewModels.Usuario;
using WpfApplication2.Views.Usuario;
using WpfApplication2.Views;
using WpfApplication2.Views.TipoOrden;
using WpfApplication2.ViewModels.TipoOrden;
using WpfApplication2.Views.Nomenclador;
using WpfApplication2.ViewModels.TipoPlan;

namespace WpfApplication2.Views.TipoPlan
{
    /// <summary>
    /// Interaction logic for EditaPlan.xaml
    /// </summary>
    public partial class EditaPlan : Page
    {
          public EditaPlan(Instancias instancias, TipoPlanDTO planIng)
            {
                InitializeComponent();
                DataContext = new EditaPlanViewModel(instancias, planIng);
            }
          private void BtnLimpiar_MouseDown(object sender, MouseButtonEventArgs e)
          {
              Image img = sender as Image;
              TextBox tb = (img.Parent as StackPanel).Children[0] as TextBox;
              if (tb.Text.Length > 0)
              {
                  img.Source = new BitmapImage(new Uri("../../Images/delete_btn.png", UriKind.Relative));
                  tb.Text = string.Empty;
              }
          }
            
    }
}
